3.821 \(\int \frac{(d+e x) \left (a+b x+c x^2\right )}{\sqrt{f+g x}} \, dx\)

Optimal. Leaf size=137 \[ -\frac{2 \sqrt{f+g x} (e f-d g) \left (a g^2-b f g+c f^2\right )}{g^4}+\frac{2 (f+g x)^{3/2} (c f (3 e f-2 d g)-g (-a e g-b d g+2 b e f))}{3 g^4}-\frac{2 (f+g x)^{5/2} (-b e g-c d g+3 c e f)}{5 g^4}+\frac{2 c e (f+g x)^{7/2}}{7 g^4} \]

[Out]

(-2*(e*f - d*g)*(c*f^2 - b*f*g + a*g^2)*Sqrt[f + g*x])/g^4 + (2*(c*f*(3*e*f - 2*
d*g) - g*(2*b*e*f - b*d*g - a*e*g))*(f + g*x)^(3/2))/(3*g^4) - (2*(3*c*e*f - c*d
*g - b*e*g)*(f + g*x)^(5/2))/(5*g^4) + (2*c*e*(f + g*x)^(7/2))/(7*g^4)

_______________________________________________________________________________________

Rubi [A]  time = 0.250471, antiderivative size = 137, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.04 \[ -\frac{2 \sqrt{f+g x} (e f-d g) \left (a g^2-b f g+c f^2\right )}{g^4}+\frac{2 (f+g x)^{3/2} (c f (3 e f-2 d g)-g (-a e g-b d g+2 b e f))}{3 g^4}-\frac{2 (f+g x)^{5/2} (-b e g-c d g+3 c e f)}{5 g^4}+\frac{2 c e (f+g x)^{7/2}}{7 g^4} \]

Antiderivative was successfully verified.

[In]  Int[((d + e*x)*(a + b*x + c*x^2))/Sqrt[f + g*x],x]

[Out]

(-2*(e*f - d*g)*(c*f^2 - b*f*g + a*g^2)*Sqrt[f + g*x])/g^4 + (2*(c*f*(3*e*f - 2*
d*g) - g*(2*b*e*f - b*d*g - a*e*g))*(f + g*x)^(3/2))/(3*g^4) - (2*(3*c*e*f - c*d
*g - b*e*g)*(f + g*x)^(5/2))/(5*g^4) + (2*c*e*(f + g*x)^(7/2))/(7*g^4)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 38.1175, size = 139, normalized size = 1.01 \[ \frac{2 c e \left (f + g x\right )^{\frac{7}{2}}}{7 g^{4}} + \frac{2 \left (f + g x\right )^{\frac{5}{2}} \left (b e g + c d g - 3 c e f\right )}{5 g^{4}} + \frac{2 \left (f + g x\right )^{\frac{3}{2}} \left (a e g^{2} + b d g^{2} - 2 b e f g - 2 c d f g + 3 c e f^{2}\right )}{3 g^{4}} + \frac{2 \sqrt{f + g x} \left (d g - e f\right ) \left (a g^{2} - b f g + c f^{2}\right )}{g^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((e*x+d)*(c*x**2+b*x+a)/(g*x+f)**(1/2),x)

[Out]

2*c*e*(f + g*x)**(7/2)/(7*g**4) + 2*(f + g*x)**(5/2)*(b*e*g + c*d*g - 3*c*e*f)/(
5*g**4) + 2*(f + g*x)**(3/2)*(a*e*g**2 + b*d*g**2 - 2*b*e*f*g - 2*c*d*f*g + 3*c*
e*f**2)/(3*g**4) + 2*sqrt(f + g*x)*(d*g - e*f)*(a*g**2 - b*f*g + c*f**2)/g**4

_______________________________________________________________________________________

Mathematica [A]  time = 0.191967, size = 131, normalized size = 0.96 \[ \frac{2 \sqrt{f+g x} \left (7 g \left (5 a g (3 d g-2 e f+e g x)+5 b d g (g x-2 f)+b e \left (8 f^2-4 f g x+3 g^2 x^2\right )\right )+c \left (7 d g \left (8 f^2-4 f g x+3 g^2 x^2\right )-3 e \left (16 f^3-8 f^2 g x+6 f g^2 x^2-5 g^3 x^3\right )\right )\right )}{105 g^4} \]

Antiderivative was successfully verified.

[In]  Integrate[((d + e*x)*(a + b*x + c*x^2))/Sqrt[f + g*x],x]

[Out]

(2*Sqrt[f + g*x]*(7*g*(5*b*d*g*(-2*f + g*x) + 5*a*g*(-2*e*f + 3*d*g + e*g*x) + b
*e*(8*f^2 - 4*f*g*x + 3*g^2*x^2)) + c*(7*d*g*(8*f^2 - 4*f*g*x + 3*g^2*x^2) - 3*e
*(16*f^3 - 8*f^2*g*x + 6*f*g^2*x^2 - 5*g^3*x^3))))/(105*g^4)

_______________________________________________________________________________________

Maple [A]  time = 0.006, size = 144, normalized size = 1.1 \[{\frac{30\,ce{x}^{3}{g}^{3}+42\,be{g}^{3}{x}^{2}+42\,cd{g}^{3}{x}^{2}-36\,cef{g}^{2}{x}^{2}+70\,ae{g}^{3}x+70\,bd{g}^{3}x-56\,bef{g}^{2}x-56\,cdf{g}^{2}x+48\,ce{f}^{2}gx+210\,ad{g}^{3}-140\,aef{g}^{2}-140\,bdf{g}^{2}+112\,be{f}^{2}g+112\,cd{f}^{2}g-96\,ce{f}^{3}}{105\,{g}^{4}}\sqrt{gx+f}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((e*x+d)*(c*x^2+b*x+a)/(g*x+f)^(1/2),x)

[Out]

2/105*(g*x+f)^(1/2)*(15*c*e*g^3*x^3+21*b*e*g^3*x^2+21*c*d*g^3*x^2-18*c*e*f*g^2*x
^2+35*a*e*g^3*x+35*b*d*g^3*x-28*b*e*f*g^2*x-28*c*d*f*g^2*x+24*c*e*f^2*g*x+105*a*
d*g^3-70*a*e*f*g^2-70*b*d*f*g^2+56*b*e*f^2*g+56*c*d*f^2*g-48*c*e*f^3)/g^4

_______________________________________________________________________________________

Maxima [A]  time = 0.69127, size = 174, normalized size = 1.27 \[ \frac{2 \,{\left (15 \,{\left (g x + f\right )}^{\frac{7}{2}} c e - 21 \,{\left (3 \, c e f -{\left (c d + b e\right )} g\right )}{\left (g x + f\right )}^{\frac{5}{2}} + 35 \,{\left (3 \, c e f^{2} - 2 \,{\left (c d + b e\right )} f g +{\left (b d + a e\right )} g^{2}\right )}{\left (g x + f\right )}^{\frac{3}{2}} - 105 \,{\left (c e f^{3} - a d g^{3} -{\left (c d + b e\right )} f^{2} g +{\left (b d + a e\right )} f g^{2}\right )} \sqrt{g x + f}\right )}}{105 \, g^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x^2 + b*x + a)*(e*x + d)/sqrt(g*x + f),x, algorithm="maxima")

[Out]

2/105*(15*(g*x + f)^(7/2)*c*e - 21*(3*c*e*f - (c*d + b*e)*g)*(g*x + f)^(5/2) + 3
5*(3*c*e*f^2 - 2*(c*d + b*e)*f*g + (b*d + a*e)*g^2)*(g*x + f)^(3/2) - 105*(c*e*f
^3 - a*d*g^3 - (c*d + b*e)*f^2*g + (b*d + a*e)*f*g^2)*sqrt(g*x + f))/g^4

_______________________________________________________________________________________

Fricas [A]  time = 0.270547, size = 169, normalized size = 1.23 \[ \frac{2 \,{\left (15 \, c e g^{3} x^{3} - 48 \, c e f^{3} + 105 \, a d g^{3} + 56 \,{\left (c d + b e\right )} f^{2} g - 70 \,{\left (b d + a e\right )} f g^{2} - 3 \,{\left (6 \, c e f g^{2} - 7 \,{\left (c d + b e\right )} g^{3}\right )} x^{2} +{\left (24 \, c e f^{2} g - 28 \,{\left (c d + b e\right )} f g^{2} + 35 \,{\left (b d + a e\right )} g^{3}\right )} x\right )} \sqrt{g x + f}}{105 \, g^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x^2 + b*x + a)*(e*x + d)/sqrt(g*x + f),x, algorithm="fricas")

[Out]

2/105*(15*c*e*g^3*x^3 - 48*c*e*f^3 + 105*a*d*g^3 + 56*(c*d + b*e)*f^2*g - 70*(b*
d + a*e)*f*g^2 - 3*(6*c*e*f*g^2 - 7*(c*d + b*e)*g^3)*x^2 + (24*c*e*f^2*g - 28*(c
*d + b*e)*f*g^2 + 35*(b*d + a*e)*g^3)*x)*sqrt(g*x + f)/g^4

_______________________________________________________________________________________

Sympy [A]  time = 32.7412, size = 549, normalized size = 4.01 \[ \begin{cases} - \frac{\frac{2 a d f}{\sqrt{f + g x}} + 2 a d \left (- \frac{f}{\sqrt{f + g x}} - \sqrt{f + g x}\right ) + \frac{2 a e f \left (- \frac{f}{\sqrt{f + g x}} - \sqrt{f + g x}\right )}{g} + \frac{2 a e \left (\frac{f^{2}}{\sqrt{f + g x}} + 2 f \sqrt{f + g x} - \frac{\left (f + g x\right )^{\frac{3}{2}}}{3}\right )}{g} + \frac{2 b d f \left (- \frac{f}{\sqrt{f + g x}} - \sqrt{f + g x}\right )}{g} + \frac{2 b d \left (\frac{f^{2}}{\sqrt{f + g x}} + 2 f \sqrt{f + g x} - \frac{\left (f + g x\right )^{\frac{3}{2}}}{3}\right )}{g} + \frac{2 b e f \left (\frac{f^{2}}{\sqrt{f + g x}} + 2 f \sqrt{f + g x} - \frac{\left (f + g x\right )^{\frac{3}{2}}}{3}\right )}{g^{2}} + \frac{2 b e \left (- \frac{f^{3}}{\sqrt{f + g x}} - 3 f^{2} \sqrt{f + g x} + f \left (f + g x\right )^{\frac{3}{2}} - \frac{\left (f + g x\right )^{\frac{5}{2}}}{5}\right )}{g^{2}} + \frac{2 c d f \left (\frac{f^{2}}{\sqrt{f + g x}} + 2 f \sqrt{f + g x} - \frac{\left (f + g x\right )^{\frac{3}{2}}}{3}\right )}{g^{2}} + \frac{2 c d \left (- \frac{f^{3}}{\sqrt{f + g x}} - 3 f^{2} \sqrt{f + g x} + f \left (f + g x\right )^{\frac{3}{2}} - \frac{\left (f + g x\right )^{\frac{5}{2}}}{5}\right )}{g^{2}} + \frac{2 c e f \left (- \frac{f^{3}}{\sqrt{f + g x}} - 3 f^{2} \sqrt{f + g x} + f \left (f + g x\right )^{\frac{3}{2}} - \frac{\left (f + g x\right )^{\frac{5}{2}}}{5}\right )}{g^{3}} + \frac{2 c e \left (\frac{f^{4}}{\sqrt{f + g x}} + 4 f^{3} \sqrt{f + g x} - 2 f^{2} \left (f + g x\right )^{\frac{3}{2}} + \frac{4 f \left (f + g x\right )^{\frac{5}{2}}}{5} - \frac{\left (f + g x\right )^{\frac{7}{2}}}{7}\right )}{g^{3}}}{g} & \text{for}\: g \neq 0 \\\frac{a d x + \frac{c e x^{4}}{4} + \frac{x^{3} \left (b e + c d\right )}{3} + \frac{x^{2} \left (a e + b d\right )}{2}}{\sqrt{f}} & \text{otherwise} \end{cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x+d)*(c*x**2+b*x+a)/(g*x+f)**(1/2),x)

[Out]

Piecewise((-(2*a*d*f/sqrt(f + g*x) + 2*a*d*(-f/sqrt(f + g*x) - sqrt(f + g*x)) +
2*a*e*f*(-f/sqrt(f + g*x) - sqrt(f + g*x))/g + 2*a*e*(f**2/sqrt(f + g*x) + 2*f*s
qrt(f + g*x) - (f + g*x)**(3/2)/3)/g + 2*b*d*f*(-f/sqrt(f + g*x) - sqrt(f + g*x)
)/g + 2*b*d*(f**2/sqrt(f + g*x) + 2*f*sqrt(f + g*x) - (f + g*x)**(3/2)/3)/g + 2*
b*e*f*(f**2/sqrt(f + g*x) + 2*f*sqrt(f + g*x) - (f + g*x)**(3/2)/3)/g**2 + 2*b*e
*(-f**3/sqrt(f + g*x) - 3*f**2*sqrt(f + g*x) + f*(f + g*x)**(3/2) - (f + g*x)**(
5/2)/5)/g**2 + 2*c*d*f*(f**2/sqrt(f + g*x) + 2*f*sqrt(f + g*x) - (f + g*x)**(3/2
)/3)/g**2 + 2*c*d*(-f**3/sqrt(f + g*x) - 3*f**2*sqrt(f + g*x) + f*(f + g*x)**(3/
2) - (f + g*x)**(5/2)/5)/g**2 + 2*c*e*f*(-f**3/sqrt(f + g*x) - 3*f**2*sqrt(f + g
*x) + f*(f + g*x)**(3/2) - (f + g*x)**(5/2)/5)/g**3 + 2*c*e*(f**4/sqrt(f + g*x)
+ 4*f**3*sqrt(f + g*x) - 2*f**2*(f + g*x)**(3/2) + 4*f*(f + g*x)**(5/2)/5 - (f +
 g*x)**(7/2)/7)/g**3)/g, Ne(g, 0)), ((a*d*x + c*e*x**4/4 + x**3*(b*e + c*d)/3 +
x**2*(a*e + b*d)/2)/sqrt(f), True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.263025, size = 309, normalized size = 2.26 \[ \frac{2 \,{\left (105 \, \sqrt{g x + f} a d + \frac{35 \,{\left ({\left (g x + f\right )}^{\frac{3}{2}} - 3 \, \sqrt{g x + f} f\right )} b d}{g} + \frac{35 \,{\left ({\left (g x + f\right )}^{\frac{3}{2}} - 3 \, \sqrt{g x + f} f\right )} a e}{g} + \frac{7 \,{\left (3 \,{\left (g x + f\right )}^{\frac{5}{2}} g^{8} - 10 \,{\left (g x + f\right )}^{\frac{3}{2}} f g^{8} + 15 \, \sqrt{g x + f} f^{2} g^{8}\right )} c d}{g^{10}} + \frac{7 \,{\left (3 \,{\left (g x + f\right )}^{\frac{5}{2}} g^{8} - 10 \,{\left (g x + f\right )}^{\frac{3}{2}} f g^{8} + 15 \, \sqrt{g x + f} f^{2} g^{8}\right )} b e}{g^{10}} + \frac{3 \,{\left (5 \,{\left (g x + f\right )}^{\frac{7}{2}} g^{18} - 21 \,{\left (g x + f\right )}^{\frac{5}{2}} f g^{18} + 35 \,{\left (g x + f\right )}^{\frac{3}{2}} f^{2} g^{18} - 35 \, \sqrt{g x + f} f^{3} g^{18}\right )} c e}{g^{21}}\right )}}{105 \, g} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x^2 + b*x + a)*(e*x + d)/sqrt(g*x + f),x, algorithm="giac")

[Out]

2/105*(105*sqrt(g*x + f)*a*d + 35*((g*x + f)^(3/2) - 3*sqrt(g*x + f)*f)*b*d/g +
35*((g*x + f)^(3/2) - 3*sqrt(g*x + f)*f)*a*e/g + 7*(3*(g*x + f)^(5/2)*g^8 - 10*(
g*x + f)^(3/2)*f*g^8 + 15*sqrt(g*x + f)*f^2*g^8)*c*d/g^10 + 7*(3*(g*x + f)^(5/2)
*g^8 - 10*(g*x + f)^(3/2)*f*g^8 + 15*sqrt(g*x + f)*f^2*g^8)*b*e/g^10 + 3*(5*(g*x
 + f)^(7/2)*g^18 - 21*(g*x + f)^(5/2)*f*g^18 + 35*(g*x + f)^(3/2)*f^2*g^18 - 35*
sqrt(g*x + f)*f^3*g^18)*c*e/g^21)/g